# 导包
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
# 获取浏览器驱动对象
driver = webdriver.Firefox()
# 打开测试页面
url = 'file:///root/NSD2408/html/registerA.html'
driver.get(url)
# 通过NAME属性定位页面中的用户名，并输入值
username = driver.find_element(By.NAME, 'userA')
username.send_keys('admin')
password = driver.find_element(By.NAME, 'passwordA')
password.send_keys('123456')
tel = driver.find_element(By.NAME, 'telA')
tel.send_keys('18812345678')
email = driver.find_element(By.NAME, 'emailA')
email.send_keys('123@qq.com')

# 停顿3秒，关闭浏览器驱动
sleep(3)
driver.quit()